package com.zhangwei;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

@SpringBootApplication
@MapperScan("com.zhangwei.mapper")
public class WeathermanageApplication  {

    /**
     * 需要把web项目打成war包部署到外部tomcat运行时需要改变启动方式
     * SpringBoot启动类继承SpringBootServletInitializer方法，并重写configure方法
     * 默认配置下，将war包发布到tomcat服务器，需要加war包的名称！！！！
     * http://localhost:8080/war包名/@RequestMapping.value访问了
     */
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//        return builder.sources(WeathermanageApplication.class);
//    }

    public static void main(String[] args) {
        SpringApplication.run(WeathermanageApplication.class, args);
    }
}
